<template>

  <el-button type="primary" @click="openlistreport()">主要按钮</el-button>
  </template>
  
  <script>
  import {ExportPresPdf} from "@/api/q1/business/reportTest";
  export default {
      data() {
      return {
  
      };
    },
    computed: {},
    created() {

    },
    methods: {
    openlistreport(){
      ExportPresPdf().then((res) => {
       var url= res.data;
       var absurl='/lib/pdfjs/web/viewer.html?file='+encodeURIComponent(url);
      window.open(absurl)  

            });
      
    
      }
  
    },

  
  }
  
  </script>
  
  
<!-- 
   <template><div class="Contract"><iframe :src="pathUr" ></iframe></div>
   </template>
   <script>
     import {ExportPresPdf} from "@/api/q1/business/reportTest";
   export default {
    data () {return {pathUr: ''
    // pdf文件地址
  }
  },created () {
    document.title = ''
    ExportPresPdf().then((res) => {
       var url= res.data;
       var absurl='/lib/pdfjs/web/viewer.html?file='+encodeURIComponent(url);
       this.pathUr= absurl;
            });

   // let filePath = this.$route.query.FilePath || ''   
     //  我的pdf地址是从上个页面传过来的，只是一个地址
    // this.pathUr = '../../../../static/pdf/web/viewer.html?file=' + filePath   

    }
   }
   </script><style lang="scss" scoped>
   .Contract{iframe{width: 100vw;height: 100vh;border: none;}
   }
   </style> -->